package com.treasure.mall.biz.mapstruct;


import com.treasure.mall.biz.dto.common.BannerSaveDTO;
import com.treasure.mall.biz.entity.banner.BannerPO;
import com.treasure.mall.biz.vo.banner.BannerVO;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

import java.util.List;

/**
 * 对象转换
 * <p>
 * All rights Reserved, Designed By framework.mgo.com
 *
 * @author 郭孟稳
 * @date 2019-10-18
 * Copyright 2017-2020 framework.mgo.com Inc. All rights reserved.
 * 注意：本内容仅限于mgo团队内部传阅，禁止外泄以及用于其他的商业目的
 */
@Mapper
public interface BannerMapStruct {

    BannerMapStruct INSTANCE = Mappers.getMapper(BannerMapStruct.class);

    /**
     * BannerSaveDTO to BannerPO
     *
     * @param dto BannerSaveDTO
     * @return BannerPO
     */
    BannerPO dto2po(BannerSaveDTO dto);

    /**
     * BannerPO to BannerVO
     *
     * @param po BannerPO
     * @return BannerVO
     */
    BannerVO po2vo(BannerPO po);

    /**
     * List<BannerPO> to List<BannerVO>
     *
     * @param pos List<BannerPO>
     * @return List<BannerVO>
     */
    List<BannerVO> pos2vos(List<BannerPO> pos);

}
